﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;

namespace EmptoolWebApp.Entities
{
    [Serializable]
    [DataContract]
    public class UserAccountEntity : BaseTableEntity
    {
        public const string TABLE_NAME = "UserAccount";

        #region constructor(s)
        public UserAccountEntity() : base()
        {

        }

        public UserAccountEntity(string email)
        {
            if (string.IsNullOrWhiteSpace(email))
            {
                throw new ArgumentNullException("email");
            }

            this.PartitionKey = email;
        }
        #endregion constructor(s)

        [DataMember]
        public string Email { get; set; }

        [DataMember]
        public string PasswordHash { get; set; }

        [DataMember]
        public string PasswordSalt { get; set; }

        [DataMember]
        public DateTime? PasswordExpiryDateTime { get; set; }

        [DataMember]
        public string PhoneNumber { get; set; }
    }
}